<!DOCTYPE html  >
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


<head th:include="/base/common_css('test')">


<body>
<div th:include="/base/common_banner"></div>

<!-- Header ends -->
<!-- Main content starts -->

<div class="content">

    <!-- Sidebar -->
    <!--menu ????-->
    <div th:include="/base/common_menu"></div>
    <!--menu????-->
    <!-- Sidebar ends -->

    <!-- Main bar -->
    <div class="mainbar">

        <!-- Page heading -->
        <div th:include="/base/common_pageHeader"></div>
        <!-- Page heading ends -->

        <div class="matter">
            <div class="container">


                <!--按条件查询-->
                <div class="panel panel-default">

                    <div class="panel-body">

                        <form id="formSearch" class="form-horizontal">
                            <div class="form-group" style="margin-top:20px">
                                <div class="col-sm-1">
                                    <lable class="control-label" style="font-size: large; color:#3c763d">礼包管理</lable>
                                </div>
                                <div class="col-sm-1">
                                    <a href="/view/present?pageNumber=1&pageSize=10"  style="background-color:#60615d"><span style="font-size: 15px;color:#fdfff4">礼包列表</span></a>
                                </div>
                                <div class="col-sm-2" style="text-align:left;">
                                    <a href="/view/save" class="btn btn-dafault btn-sm"><span style="font-size: 15px;color:#60615d">新增</span></a>
                                </div>
                            </div>
                            <!--搜索条件-->
                            <div class="form-group" style="margin-top:10px">
                                <label class="control-label col-sm-1" for="presentDescription">礼包类型</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" id="presentDescription">
                                </div>
                                <label class="control-label col-sm-1" for="isShow">礼包状态</label>
                                <div class="col-sm-2">
                                    <select id="isShow" th:value="${isShow}"
                                            class="selectpicker show-tick form-control">
                                        <option>---不限---</option>
                                        <option value="0">显示</option>
                                        <option value="1">隐藏</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group" style="margin-top:10px">
                                <label class="control-label col-sm-1">结果排序</label>
                                <div class="col-sm-1">
                                    <select id="rankType" name="rankType" class="selectpicker show-tick form-control">
                                        <option>默认排序</option>
                                        <option value="sort">序号</option>
                                        <option value="createTime">创建时间</option>
                                    </select>
                                </div>

                                <div class="col-sm-1">
                                    <select id="orderType" name="orderType" class="selectpicker show-tick form-control">
                                        <option>请选择</option>
                                        <option value="desc">逆序</option>
                                        <option value="asc">正序</option>
                                    </select>
                                </div>
                                <div class="col-sm-4" style="text-align:left;">
                                    <button type="button" style="margin-left:10px" class="btn btn-default btn_sm"
                                            onclick="searchPresent()">查询
                                    </button>
                                </div>
                            </div>

                        </form>
                    </div>
                </div>


                <div class="row">
                    <div class="col-md-10">

                        <div class="widget">

                            <div class="widget-head">
                                <div class="pull-left" style="color: #3c763d">礼包列表</div>
                                <div></div>
                                <div class="widget-icons pull-right">
                                </div>

                                <div class="clearfix"></div>

                            </div>
                            <!--批量操作-->
                            <div class="form-group" style="margin-top:20px">

                                <div class="btn-toolbar" role="toolbar">
                                    <div class="btn-group" style="margin-left: 15px">
                                        <button type="button" class="btn btn-default btn-sm">显示</button>
                                    </div>
                                    <div class="btn-group" style="margin-left: 15px">
                                        <button type="button" class="btn btn-default btn-sm">隐藏</button>
                                    </div>
                                    <div class="col-sm-1">
                                        <select id="sort" name="sort"
                                                class="selectpicker show-tick form-control">
                                            <option>排序</option>
                                            <option th:each="obj:${presentList.list}"
                                                    th:value="${obj.sort}"
                                                    th:text="${obj.sort}"
                                                    th:selected="${obj.sort == sort}"></option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="widget-content medias">
                                <table id="categoryTable" border="1"
                                       class="table table-striped table-bordered table-hover"
                                       style="table-layout:fixed">
                                    <thead>
                                    <tr style="background: rgb(208, 208, 208)">
                                        <th><span class="uni"><input type='checkbox' value='check1'/>全选</span>
                                        </th>
                                        <th>序号</th>
                                        <th>礼包类型</th>
                                        <th>礼包名称</th>
                                        <th>礼包描述</th>
                                        <th>领取条件</th>
                                        <th>重置周期</th>
                                        <th>奖励</th>
                                        <th>状态</th>
                                        <th>创建时间</th>
                                        <th>操作</th>
                                    </tr>
                                    <tbody>
                                    <tr th:each="obj:${presentList.list}" class="cateList">
                                        <td><span class="uni"><input type='checkbox' value='check1'/></span>
                                        </td>
                                        <td th:text="${obj.sort}" ></td>
                                        <td th:text="${obj.presentType}"></td>
                                        <td th:text="${obj.presentDescription}" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"></td>
                                        <td th:text="${obj.condition }"></td>\
                                        <td th:text="${obj.resetTime }"></td>
                                        <td th:text="${obj.award}"></td>
                                        <td th:text="${obj.isShow}? '隐藏':'显示' "></td>
                                        <td th:text="${#dates.format(obj.createTime,'yyyy-MM-dd')} "></td>
                                        <td>

                                            <a th:href="@{'/view/saveCategory?cateId='+${obj.cateId}}"><span style="font-size: 10px;color:#0035b0">编辑</span></a>&nbsp;&nbsp;&nbsp;
                                            <!--<a th:href="@{'/view/deleteCategory?cateId='+${obj.cateId}}"-->
                                            <!--class="btn btn-danger">删除</a>-->
                                        </td>
                                    </tr>
                                    </tbody>
                                    </thead>
                                </table>
                                <!--批量操作-->
                                <div class="form-group" style="margin-top:20px">

                                    <div class="btn-toolbar" role="toolbar">
                                        <div class="btn-group" style="margin-left: 15px">
                                            <button type="button" class="btn btn-default btn-sm">显示</button>
                                        </div>
                                        <div class="btn-group" style="margin-left: 15px">
                                            <button type="button" class="btn btn-default btn-sm">隐藏</button>
                                        </div>

                                        <div class="col-sm-1">
                                            <select id="sort1" name="sort"
                                                    class="selectpicker show-tick form-control">
                                                <option>排序</option>
                                                <option th:each="obj:${presentList.list}"
                                                        th:value="${obj.sort}"
                                                        th:text="${obj.sort}"
                                                        th:selected="${obj.sort == sort}"></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>

                                <!--分页-->
                                <div class="widget-foot">
                                    <div id="page2">
                                        <input type="hidden" id="pageNumber" th:value="${presentList.pageNum}">
                                        <input type="hidden" id="pageSize" th:value="${presentList.pageSize}">
                                        <input type="hidden" id="totalPage" th:value="${presentList.pages}">
                                        <input type="hidden" id="total" th:value="${presentList.total}">
                                    </div>
                                </div>
                                <!-- Mainbar ends -->
                                <div class="clearfix"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--footer-->
<div th:include="/base/common_footer"></div>
<!---->
<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span>
<!--js????-->
<div th:include="/base/common_js"></div>
<!--js????-->
<script type="text/javascript">

    initPage('page2', '/view/present', {}, false);

</script>
<!-- Script for this page -->
</body>
</html>
